import Vue from 'vue';
import App from './App.vue';
import compo from '@/index';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

Vue.use(Antd);
Vue.use(compo);
function dragstart(event) {
  event.dataTransfer.setData('text/plain', event.target.outerHTML);
}
Vue.directive('drap', {
  inserted(el) {
    el.setAttribute('draggable', true);
    el.addEventListener('dragstart', dragstart);
  },
  unbind(el) {
    el.removeEventListener('dragstart', dragstart);
  },
});

new Vue({
  el: '#app',
  render: (h) => h(App),
});
